﻿using project.B12.application.ViewModels;
using project.B12.ViewModels;
using System.Windows;
using System.Windows.Controls;

namespace project.B12.Views
{
    /// <summary>
    /// MainView.xaml 的交互逻辑
    /// </summary>
    public partial class MainView : UserControl
    {
        public MainView()
        {
            InitializeComponent();
            MainViewModel mainViewModel=DataContext as MainViewModel;
            MonitorViewModel monitorViewModel = mainViewModel.CurrentMonitorView.DataContext as MonitorViewModel;
            if (monitorViewModel != null)
            {
                monitorViewModel.WaitInitializtion();
            }
        }

        private void window_Loaded(object sender, RoutedEventArgs e)
        {
            MainTabControl.SelectedIndex = 0;
        }
    }
}
